package com.huatai.datacenter.entity;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @program: ht-system
 * @description: 获取最新一条数据
 * @author: songxiude
 * @create: 2023-04-25 16:56
 **/
@Data
public class QueryLastSingle {

    /**
     * 是否返回 tags
     * 默认 false
     */
    @NotNull
    private boolean resolveNames = true;
    /**
     * 回溯时间 小时制
     */
    @NotNull
    private Integer backScan = 24;
    /**
     * 量测信息
     */
    @NotNull
    private String[] metrics;
    /**
     * 设备编码
     */
    @NotBlank
    private String equipCode;

    public QueryLastSingle() {
    }

    public QueryLastSingle(@NotNull boolean resolveNames, @NotNull Integer backScan, @NotNull String[] metrics, @NotBlank String equipCode) {
        this.resolveNames = resolveNames;
        this.backScan = backScan;
        this.metrics = metrics;
        this.equipCode = equipCode;
    }
}
